package cn.codelab.springcloudalibaba.study.step04.controller;

import cn.codelab.springcloudalibaba.study.step04.feignclient.DemoFeignClient;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Seven
 * @description 测试Feign调用controller
 * @Gitee https://gitee.com/it-codelab
 * @Copyright 公众号：Seven的代码实验室
 */
@AllArgsConstructor
@RestController
@RequestMapping("/feign/demo")
public class DemoController {
    private final DemoFeignClient demoFeignClient;

    @GetMapping("/test")
    public String test() {
        // feign调用
        String msg = demoFeignClient.say("Feign");
        return "调用结果：" + msg;
    }
}
